Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589,
authorMatthias Clasen <mclasen@redhat.com>
Wed, 12 Oct 2005 13:49:26 +0000 (13:49 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 12 Oct 2005 13:49:26 +0000 (13:49 +0000)
2005-10-12  Matthias Clasen  <mclasen@redhat.com>

* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call
gdk_pixbuf_loader_eat_header_write() when count > 0.  (#318589,
Bogdan Nicula)

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-loader.c

index 41b8b79467d4cc46eba3c6beb7161303235e18c5..16df5ead2cc0b5847a588ed55a15ee434a9ad8e1 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-12  Matthias Clasen  <mclasen@redhat.com>
+
+       * gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call
+       gdk_pixbuf_loader_eat_header_write() when count > 0.  (#318589,
+       Bogdan Nicula)
+
 2005-10-03  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): 
index 78689e58ebfc6bf82f18090b8b0dd724955e98d2..90281b074bc337d3895fc5a868a3005c15235693 100644 (file)
@@ -485,7 +485,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
         /* we expect it's not to be closed */
         g_return_val_if_fail (priv->closed == FALSE, FALSE);
   
-        if (priv->image_module == NULL)
+        if (count > 0 && priv->image_module == NULL)
                 {
                         gint eaten;
       
@@ -727,7 +727,9 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
         /* we expect it's not closed */
         g_return_val_if_fail (priv->closed == FALSE, TRUE);
   
-        /* We have less the 128 bytes in the image.  Flush it, and keep going. */
+        /* We have less the LOADER_HEADER_SIZE bytes in the image.  
+         * Flush it, and keep going. 
+         */
         if (priv->image_module == NULL)
                 {
                         GError *tmp = NULL;